import Store from '@/store/';
import Layout from '@/page/index/index.vue';

export default [
  {
    path: '/login',
    name: '登录页',
    component: () =>
      Store.getters.isMacOs ? import('@/mac/login.vue') : import('@/page/login/index.vue'),
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/oauth/redirect/:source',
    name: '第三方登录',
    component: () =>
      Store.getters.isMacOs ? import('@/mac/login.vue') : import('@/page/login/index.vue'),
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/lock',
    name: '锁屏页',
    component: () =>
      Store.getters.isMacOs ? import('@/mac/lock.vue') : import('@/page/lock/index.vue'),
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "page" */ '@/components/error-page/404.vue'),
    name: '404',
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/403',
    component: () => import(/* webpackChunkName: "page" */ '@/components/error-page/403.vue'),
    name: '403',
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/500',
    component: () => import(/* webpackChunkName: "page" */ '@/components/error-page/500.vue'),
    name: '500',
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: '/',
    name: '主页',
    redirect: '/wel',
  },
  {
    path: '/CrfH5',
    name: 'CRFH5端',
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
    component: () => import(/* webpackChunkName: "views" */ '@/views/trial/components/QRCodeCrfH5.vue'),
  },
  {
    path: '/CrfH5',
    children: [
      {
        path: 'login',
        name: '登录/新建',
        meta: {
          i18n: 'login',
          keepAlive: true,
          isTab: false,
          isAuth: false,
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/trial/components/QRCodeCrfH5Menu/login.vue'),
      },
    ],
  },
  {
    path: '/CrfH5',
    children: [
      {
        path: 'FillCrf',
        name: '填写CRF',
        meta: {
          i18n: 'FillCrf',
          keepAlive: true,
          isTab: false,
          isAuth: false,
        },
        component: () => import(/* webpackChunkName: "views" */ '@/views/trial/components/QRCodeCrfH5Menu/FillCrf.vue'),
      },
    ],
  },
];
